package com.example.demo1;

public abstract class Handler {

    protected Handler successor = null;

    public abstract void handle(String msg);

    public Handler getSuccessor() {
        return successor;
    }

    public void setSuccessor(Handler successor) {
        this.successor = successor;
    }
}
